package com.tjf.lib_core;

import android.content.Context;

import com.tjf.lib_core.dialog.LoadingDialog;

/**
 * 数据加载提示框
 */
public class LoadIngDialogUtil {

    LoadingDialog loadingDialog;
    Context context;

    public LoadIngDialogUtil(Context context) {
        this.context = context;
    }

    public void showLoadDialog(String tipMsg) {
        removeLoadDialog();
        loadingDialog = new LoadingDialog(context);
        loadingDialog.setTitleText(tipMsg).show();
    }

    public void removeLoadDialog() {
        if (loadingDialog != null && loadingDialog.isShowing()) {
            loadingDialog.dismiss();
            loadingDialog = null;
        }
    }
}
